feat(notifications): implement real-time notification system - #428
Merged
Mkalbani merged 1 commit intoAug 25, 2026
Merged
Conversation
|
@mijinummi Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[FEAT] Real-Time Notification System
Summary
Closes #411
Implements a complete real-time notification infrastructure for the quest service, providing instant WebSocket delivery, durable notification history, user preference controls, queued processing, delivery tracking, retries, and notification aggregation.
The system is designed to reliably deliver notifications without overwhelming users or the backend, while maintaining an auditable record of notification delivery and failure states.
What Changed
🔔 Notification Architecture
Introduced a centralized notification architecture covering the complete notification lifecycle:
Notifications are persisted and processed asynchronously, separating event generation from real-time delivery.
⚡ WebSocket Delivery
🏷️ Notification Types
Added structured notification types to provide consistent notification payloads across the backend.
Notification metadata can be used to distinguish events and provide clients with the information required to render the appropriate notification experience.
⚙️ User Preferences
Implemented user notification preferences so users can control which notification categories they receive.
Preference checks occur before delivery, ensuring disabled notification types are not unnecessarily pushed to users.
📬 Notification Queue
Introduced queued notification processing to prevent large notification bursts from overwhelming the WebSocket layer or application workers.
The queue provides:
📍 Delivery Tracking
Added delivery status tracking throughout the notification lifecycle.
The system can distinguish between states such as:
This provides an auditable delivery trail and makes failed notifications easier to diagnose.
🔁 Retry Logic
Added retry handling for transient delivery failures.
Failed notifications are reprocessed according to the configured retry policy rather than being permanently lost after the first unsuccessful attempt.
🗂️ Notification History
Implemented persistent notification history so users and application services can access previously generated notifications.
History provides visibility into notifications that were delivered, failed, or otherwise processed by the system.
📦 Notification Aggregation
Added aggregation for compatible notification events to prevent users from being flooded by repetitive notifications during high-volume activity.
Related events can be grouped into a single notification representation where appropriate.
This improves the user experience while reducing unnecessary delivery traffic.
Reliability & Scalability
The notification pipeline separates notification creation from delivery:
This allows the system to continue operating reliably when users are temporarily disconnected or when notification volume increases significantly.
Testing
Added comprehensive coverage for:
Acceptance Criteria
Result
The quest service now provides a reliable, scalable real-time notification system with WebSocket delivery, preference management, queued processing, retry handling, delivery tracking, persistent history, and aggregation.
This provides users with immediate notifications while ensuring the backend can safely handle transient failures and high-volume notification workloads.